# -*- coding: utf_8 -*-
# @Author : RSW
# @Time : 2022/1/8
# @Remark: pyweb
from mxsoftpy import Module

server_room_module = Module('server_room', url_prefix='/crm')

from .server_room import (AllList, AllSearch, GroupList, GroupAdd, GroupUpdate, GroupDelete, GroupRetrieve, GroupRoute,
                          RoomAdd, RoomUpdate, RoomDelete, RoomList, RoomRetrieve, RoomRoute, IOTRelevanceView,
                          RoomOverviewList, IOTOperationView, GroupOverviewList)

# 机房
server_room_module.add_resource(AllList, '/config/all_list.sy')  # 展示机房与组
server_room_module.add_resource(AllSearch, '/config/all_search.sy')  # 搜索机房与组

server_room_module.add_resource(GroupList, '/config/group_list.sy')  # 展示机房组(添加机房或机房组时使用)
server_room_module.add_resource(GroupAdd, '/config/group_add.sy')  # 添加组
server_room_module.add_resource(GroupUpdate, '/config/group_update.sy')  # 编辑组
server_room_module.add_resource(GroupDelete, '/config/group_delete.sy')  # 删除组(逻辑删除)
server_room_module.add_resource(GroupRetrieve, '/config/group_retrieve.sy')  # 回显机房组
server_room_module.add_resource(GroupRoute, '/config/group_route_retrieve.sy')  # 回显机房组路径

server_room_module.add_resource(RoomAdd, '/config/room_add.sy')  # 添加机房
server_room_module.add_resource(RoomUpdate, '/config/room_update.sy')  # 编辑机房
server_room_module.add_resource(RoomDelete, '/config/room_delete.sy')  # 删除机房
server_room_module.add_resource(RoomList, '/config/room_list.sy')  # 机房详情页(点击组时显示)
server_room_module.add_resource(RoomRetrieve, '/config/room_retrieve.sy')  # 展示指定机房信息(添加机柜时使用,(回显))
server_room_module.add_resource(RoomOverviewList, '/config/room_overview.sy')  # 机房概览
server_room_module.add_resource(GroupOverviewList, '/config/group_overview.sy')  # 机房组概览
server_room_module.add_resource(RoomRoute, '/config/cabinet_route_retrieve.sy')  # 回显机房组路径

server_room_module.add_resource(IOTRelevanceView, '/config/iot_relevance.sy')  # 关联动环
server_room_module.add_resource(IOTOperationView, '/config/iot_operation.sy')  # 动环设备操作

from .server_cabinet import (CabinetList, CabinetAdd, CabinetRetrieve, CabinetSelect, CabinetUpdate, CabinetUnbound,
                             CabinetDelete, CabinetAdds, CabinetDistribution)

# 机柜
server_room_module.add_resource(CabinetList, '/config/cabinet_list.sy')  # 展示机柜
server_room_module.add_resource(CabinetAdd, '/config/cabinet_add.sy')  # 添加机柜
server_room_module.add_resource(CabinetRetrieve, '/config/cabinet_retrieve.sy')  # 回显机柜
server_room_module.add_resource(CabinetSelect, '/config/cabinet_select.sy')  # 添加已有的机柜
server_room_module.add_resource(CabinetUpdate, '/config/cabinet_update.sy')  # 更新机柜
server_room_module.add_resource(CabinetUnbound, '/config/cabinet_unbound.sy')  # 移除机柜
server_room_module.add_resource(CabinetDelete, '/config/cabinet_delete.sy')  # 删除机柜

server_room_module.add_resource(CabinetAdds, '/config/cabinet_adds.sy')  # 添加机柜（机柜管理）
server_room_module.add_resource(CabinetDistribution, '/config/cabinet_distribution.sy')  # 绑定机房
